<?php
		require_once(dirname(__FILE__) . '/../../lib/PageLayout.php');
		require_once(dirname(__FILE__) . '/../../lib/MarketDB.php');
		
		$marketDB = new MarketDB();
		$align = array("left", "right");
		$data = array();
		$sales = $marketDB->getHighestSalesDay(10);
		for ($i = 0; $i < count($sales); $i++) {
			$data[] = array($sales[$i]['day'], getGoldOnly($sales[$i]['money']) );
		}
		if (count($sales) == 0) {
			$data[] = array("No data found.");
		}
		$dates = new Table();
		$dates->setStyle( array('padding' => 0, 'background-color' => 'green', 'width' => '100%') );
		$dates->setHorizMargin('auto');
		$dates->setVertMargin('0px');
		$dates->addData($data);
		$dates->setAlign($align);
		$dates->useSessions();
		$dates->printTable();
		unset($marketDB);	
?>